// 引入项目中全局组件
import SvgIcon from '@/components/SvgIcon/index.vue'
import Pagination from '@/components/Pagination/index.vue'
import Dialog from '@/components/Pop/Dialog.vue'
import Category from '@/components/Category/index.vue'
import Drawer from '@/components/Pop/Drawer.vue'

// 全局组件对象
const allGlobalComponent: any = {
  SvgIcon,
  Pagination,
  Category,
  Dialog,
  Drawer
}
export default {
  install(app: any) {
    // 注册全局组件
    Object.keys(allGlobalComponent).forEach((key: any) => {
      app.component(key, allGlobalComponent[key])
    })
  }
}
